package Test2;

import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ling
 * Date: 2022-05-13
 * Time: 15:03
 */
public class ChatRoom {
    public static void main(String[] args) {
        System.out.println("欢迎您来到聊天室");
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入本程序发送端端口号:");
        int sendPort=sc.nextInt();
        System.out.println("请输入本程序接收端端口号:");
        int  receiverPort=sc.nextInt();
        System.out.println("聊天系统启动");
        new Thread(new SendTask(sendPort),"发送端任务").start();//发送端
        new Thread(new ReceiverTask(receiverPort),"接收端任务").start();//接收端
    }
}
